package com.jms.logger.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jms.logger.dao.LoggerDao;
import com.jms.logger.po.LoggerInfo;
import com.jms.logger.service.LoggerService;

@Service("loggerService")
public class LoggerServiceImpl implements LoggerService{
	/**
	 * 注入数据层dao对象
	 */
	@Autowired(required=true)
	@Resource(name="loggerDao")
	private LoggerDao loggerDao;
	
	@Override
	@Transactional
	public void addLogger(LoggerInfo loggerInfo) {
		loggerDao.addLogger(loggerInfo);
	}

	@Override
	public List<LoggerInfo> showLogger() {
		return loggerDao.showLogger();
	}

}
